home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / comm / ytsg3.zip / FMF.H < prev    next >
Text File  |  1992-09-22  |  4KB  |  78 lines

  1. /************************************************/
  2. /* Author: G.R. Blair                           */
  3. /*         BOBBLAIR @ AUSVM1                    */
  4. /*         bobblair@bobblair.austin.ibm.com     */
  5. /*                                              */
  6. /* The following code is property of            */
  7. /* International Business Machines Corporation. */
  8. /*                                              */
  9. /* Copyright International Business Machines    */
  10. /* Corporation,1990,1991.  All rights reserved. */
  11. /************************************************/
  12.  
  13. /*-----------------------------------------------------------------------*/
  14. /* Modification History:                                                 */
  15. /*      Release 1       5/1/91                                           */
  16. /*  @1 5.8.91 The logic for selecting files by attribute needed lots of  */
  17. /*            work                                                       */
  18. /*  @2 9.22.92 Add constant for "Network Access Denied"                  */
  19. /*-----------------------------------------------------------------------*/
  20.  
  21. /* Header file containing the prototypes for the four external "find matching
  22. file" procedures. */
  23.  
  24. #ifdef FSFTEST
  25. #define EXTERN
  26. #else
  27. #define EXTERN extern
  28. #endif
  29.  
  30.                    /* initialize a search.  Must be called first            */
  31. EXTERN int fmf_init(char *filespec, unsigned mask, int searchmode);
  32.  
  33.                    /* return next file matching search pattern              */
  34. EXTERN int fmf_return_next(char *CopyNameTo, int *CopyAttrTo);
  35.  
  36.                    /* Query how many threads can use this code simultaneously*/
  37. EXTERN int fmf_query_max_threads(void);
  38.  
  39.                    /* Close a search & recover resources used for it        */
  40. EXTERN void fmf_close(void);
  41.  
  42. /* Constants defining the kinds of files you may request  */
  43. #define FMF_FILES              0x0001
  44. #define FMF_DIRS               0x0002
  45. #define FMF_DIRS_AND_FILES     (FMF_FILES | FMF_DIRS)
  46. #define FMF_ALLMARK            0x8000
  47. #define FMF_ALL_FILES          (FMF_FILES | FMF_ALLMARK)
  48. #define FMF_ALL_DIRS           (FMF_DIRS | FMF_ALLMARK)
  49. #define FMF_ALL_DIRS_AND_FILES (FMF_ALL_FILES | FMF_ALL_DIRS)
  50. #define FMF_READONLY           0x0004
  51. #define FMF_HIDDEN             0x0008
  52. #define FMF_SYSTEM             0x0010
  53.  
  54. /* Constants defining the two search modes: walk-the-tree, or not */
  55. #define FMF_SUBDIR    1
  56. #define FMF_NO_SUBDIR 0
  57.  
  58. /* Return Codes.  */
  59.  
  60. #define FMF_NO_ERROR 0   /* If FMF_NO_ERROR is returned, then a file name has
  61.                             been returned.                                    */
  62.  
  63. #define FMF_NO_MORE_FILES 18  /* If this is returned, there are no more files
  64.                                  that match the search argument.  A file name
  65.                                  has NOT been returned.                       */
  66.  
  67. #define FMF_PATH_NOT_FOUND 3  /* If this is returned by fmf_init, the search
  68.                                  argument contains an invalid path name.      */
  69.  
  70. #define FMF_OUT_OF_THREAD_ROOM -1 /* If this is returned, too many threads are
  71.                                    already trying to use fmf.                 */
  72.  
  73. #define FMF_OUT_OF_MEMORY  -2 /* Error trying to allocate memory.  Treat as
  74.                                  a fatal error.                               */
  75.  
  76. #define FMF_NETWORK_ACCESS_DENIED   65                                 /* @2a */
  77. /* Other values returned are system return codes */
  78.